package com.toycloud.system.mapper.feedback;

import com.toycloud.business.dto.params.FeedbackAnalysisParams;
import com.toycloud.system.domain.dto.AnalysisDetailDTO;
import com.toycloud.system.domain.dto.FeedbackAnalysisDataFactorDto;
import com.toycloud.system.domain.feedback.FeedbackAnalysisData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDate;
import java.util.List;

@Repository
public interface FeedbackAnalysisDataMapper {

    List<AnalysisDetailDTO> selectFeedbackStatisticsByParams(FeedbackAnalysisParams params);

    List<FeedbackAnalysisData> selectByParams(FeedbackAnalysisParams params);

    int deleteByFeedbackRecordId(long feedbackRecordId);

    int multiInsert(List<FeedbackAnalysisData> feedbackAnalysisDataList);

    List<FeedbackAnalysisData> selectAll();

    List<FeedbackAnalysisDataFactorDto> selectFeedbackAnalysisData(
            @Param("products") List<String> productList,
            @Param("categories") List<String> categoriyList,
            @Param("problemList") List<String> problemList,
            @Param("startTime") LocalDate startTime,
            @Param("endTime") LocalDate endTime,
            @Param("status") List<String> status);

    int deleteByThreeLevelLabel(long threeLevelLabel);

    int deleteByFirstLevelLabel(int firstLevelLabel);

    int deleteBySecondLevelLabel(int secondLevelLabel);

    int deleteByBrand(Integer brand);

    int deleteByProduct(Integer product);

    int deleteByStep(Integer step);

    int deleteBySource(Integer source);
}
